package com.alibaba.shopping_common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CodeEnum {

    // 正常
    SUCCESS(200, "OK"),
    // 系统异常
    SYSTEM_ERROR(500, "系统异常"),
    // 业务异常
    PARAMETER_ERROR(601, "参数异常"),
    PARAMETER_IS_NULL(602, "参数为空"),
    INERT_PRODUCT_TYPE_ERR(603, "最小产品类型级别不能再新增子类型数据"),
    FILE_UPLOAD_ERR(604, "文件上传异常"),
    FILE_DELETE_ERR(605, "文件删除异常"),
    DELETE_PRODUCT_TYPE_ERR(606, "删除失败，该类型下存在子类型数据，请先删除子类型数据"),
    REGISTER_CODE_CHECK_FAIL(607, "验证码校验失败"),
    REGISTER_REPEAT_PHONE_ERROR(608, "该手机号已被注册"),
    REGISTER_REPEAT_USERNAME_ERROR(609, "该用户名已被注册"),
    USER_NOT_REGISTERED(610, "该用户名未注册"),
    LOGIN_CHECK_CODE_ERROR(610, "验证码输入错误"),
    LOGIN_CHECK_NOT_EXIST(610, "验证码不存在"),
    PASSWORD_ERROR(611, "密码错误"),
    QR_CODE_ERROR(612, "二维码获取错误"),
    CHECK_SIGN_ERROR(613, "回调时验证签名失败"),
    OOT_Of_STOCK_ERROR(614, "商品库存不足"),
    ORDER_EXPIRED_ERROR(615, "秒杀订单支付异常"),
    ;
    private final Integer code;
    private final String message;
}
